import unittest
import time
from script.employee import TestEmployee
from script.login_params import TestLogin
from tool.HTMLTestRunner import HTMLTestRunner

suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestLogin))
#suite.addTest(TestLogin("test01_case01"))
suite.addTest(unittest.makeSuite(TestEmployee))


# 指定测试报告的路径 带时间的jenkins访问不到
#report = "./report/report-{}.html".format(time.strftime("%Y%m%d-%H%M%S"))
report = "./report/report.html"

with open(report,"wb") as f:
    runner = HTMLTestRunner(f,title="API Report")
    runner.run(suite)
